<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('功能任务通知页面')" />
	<th:block th:include="include :: businessCSS" />
	<style type="text/css">
		.layui-form-radio>i{position: relative !important;left: 0;margin-top:0 !important}
	</style>
</head>
<body>
<form class="layui-form head-form">
	<input type="hidden" id="bUser" name="bUser">
	<input type="hidden" id="cUser" name="cUser">
	<input type="hidden" id="pGuid" name="pGuid">
	<input type="hidden" id="pageTitle" name="pageTitle">
	<input type="hidden" id="pageURL" name="pageURL">
	<input type="hidden" id="dataURL" name="dataURL">
	<div class="layui-form layui-card-header layuiadmin-card-header-auto" style="width:calc(100%-30px)">
		<div class="layui-form-item margin_t0">
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label">主题：</label>
				<div class="layui-input-block">
					<input type="text" id="taskContent" name="taskContent" class="layui-input" autocomplete="off" placeholder="请输入">
				</div>
			</div>
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label">摘要：</label>
				<div class="layui-input-block">
					<input type="text" id="taskAbstract" name="taskAbstract" class="layui-input" autocomplete="off" placeholder="请输入">
				</div>
			</div>
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label">发起人：</label>
				<div class="layui-input-block">
					<input type="text" id="bUserName" name="bUserName" class="layui-input canntEdit" autocomplete="off" readonly>
				</div>
			</div>
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label"><font class="f_red">*</font>接收人：</label>
				<div class="layui-input-block" onclick="getMore('cUserName',null,'接收人','ts_userinfo',false,false,false);">
		        	<input type="text" id="cUserName" name="cUserName" class="layui-input" autocomplete="off" readonly>
			  		<i class="layui-icon layui-icon-more getMore" style="position:absolute"></i>
				</div>
			</div>
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label">发起时间：</label>
				<div class="layui-input-block">
					<input type="text" id="createTime" name="createTime" class="layui-input canntEdit" autocomplete="off" readonly>
				</div>
			</div>
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label">处理期限：</label>
				<div class="layui-input-block">
					<input type="text" id="limitTime" name="limitTime" autocomplete="off" class="layui-input" lay-verify="date" placeholder="请选择时间" readonly/>
				</div>
			</div>
			<div class="'layui-inline margin_r0">
				<label class="layui-form-label">通知方式：</label>
				<div class="layui-input-block">
					<input type="radio" id="moduleTable" name="moduleTable" value="Commonality_Not_Repeat" title="已处理过的用户不再生成重复任务" checked>
				</div>
				<div class="layui-input-block">
					<input type="radio" id="moduleTable" name="moduleTable" value="Commonality_Untreated_Repeat" title="已处理过的用户将会重新生成新的任务">
				</div>
				<div class="layui-input-block">
					<input type="radio" id="moduleTable" name="moduleTable" value="Commonality_Deal_Repeat" title="所有用户均生成重复任务(保留原任务中已处理的任务，删除未处理的任务，同时生成新任务)">
				</div>
				<div class="layui-input-block">
					<input type="radio" id="moduleTable" name="moduleTable" value="Commonality_All_Repeat" title="所有用户均生成重复任务(保留原任务同时生成新任务)">
				</div>
			</div>
		</div>
	</div>
	</form>
<th:block th:include="include :: footer" />
<th:block th:include="include :: businessJS" />
<script th:inline="javascript">
    /*<![CDATA[*/
    var session=[[${session}]],
    	gridColumns=[[${gridColumns}]];
    /*]]>*/
</script>
<script type="text/javascript">
var $,layer,form,table,laydate,element;//定义layui模块
layui.use(['laydate', 'table','form','layer','jquery','util','element'], function () {
 	$ = layui.$,layer = layui.layer,form = layui.form,table = layui.table,laydate = layui.laydate,util = layui.util,element=layui.element;
 	laydate.render({elem:'#limitTime',type:'datetime',trigger:'click'});
 	var urlSA=getUrlSearchToArray(window.location.search);//切割url提取参数并返回成map数组格式
 	
 	$('#pGuid').val(urlSA['pg']);//单据guid或nid
	$('#pageTitle').val(urlSA['pt']);//页面标题
	$('#pageURL').val(urlSA['pu']+'?nid='+urlSA['pg']);//页面URL
	$('#dataURL').val(urlSA['du']);//数据URL
	
 	$('#taskContent').val('您有一份【'+urlSA['pt']+'】任务待处理。');//主题
 	$('#taskAbstract').val(urlSA['ta']);//摘要
	$('#cUser').val(urlSA['cu']);//任务接收人编号
 	$('#cUserName').val(urlSA['cun']);
	$('#bUser').val(session.mandatorUser.userId);//任务发起人编号
 	$('#bUserName').val(session.mandatorUser.userName);
	$('#createTime').val(getTime());
})
function callbackdata(){
	if($('#cUser').val())return $('form').serializeFormToJson();
	else return false;//无接收人则返回false
}
</script>
</body>
</html>